    let login=(req,res)=>{
        let query=req.query;
        let name=query.name;
        let pwd=query.pwd;
        if(name=='101' && pwd=='123'){
            res.end('登陆成功');
        }else{
            throw new Error('密码或账户错误');
        }

    }

    let regist=(req,res)=>{
        let body=req.body;
        let name=body.name;
        let pwd=body.pwd;
        res.end(`名字：${name}\n密码：${pwd}`)
    }

    let getUserInfo=(req,res)=>{
    // let header=req.headers;
    // let token=header.token;
    // let cookie=req.cookie;
    // let lyc2=cookie.lyc2;
    res.send({
        name:'lyc',
        class:'xunke',
        // token:token,
        // lyc2
    })
    }
    module.exports={login,regist,getUserInfo}